home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1993
/
MacHack 1993.toast
/
MacHack™ 1987-1992
/
MacHack™ '92
/
Hacks ’92
/
NotificationMon ƒ
/
NotificationMon.ƒ
/
Source
/
Printing.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-06-22
|
408 b
|
31 lines
|
[
TEXT/KAHL
]
/*
*/
#include <Printing.h>
short GetPrinterID()
{
THPrint tpr;
short printerID;
short err;
tpr = NewHandle(sizeof(TPrint));
if(!tpr) return -1;
PrOpen();
if(err = PrError())
{
Debugger();
}
(void) PrValidate(tpr); /* initialize print rec */
/* get printer ID from high byte of wDev */
printerID = (**tpr).prStl.wDev >> 8;
PrClose();
DisposHandle(tpr);
return printerID;
}